// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import ElementUI from 'element-ui'
import Axios from 'axios'
import 'element-ui/lib/theme-chalk/index.css'

import Common from './common'
import CustomerAPI from './CustomerAPI'
import AdministratorAPI from './AdministratorAPI'
import MerchantAPI from './MerchantAPI'
Vue.config.productionTip = false

Vue.use(Vuex)
Vue.use(ElementUI)
Vue.prototype.$axios = Axios
Vue.prototype.$common = Common
Vue.prototype.$customerAPI = CustomerAPI
Vue.prototype.$administratorAPI = AdministratorAPI
Vue.prototype.$merchantAPI = MerchantAPI
const store = new Vuex.Store({
  state: {
    currentUser: {
      // id: '123456789123456789123456789',
      // username: 'burgess',
      // image: '6-jpg'
      id: '',
      username: '',
      image: ''
    },
    merchantUser: {
      // id: '123456789123456789123456789',
      // username: 'burgess',
      // image: '6-jpg'
      id: '',
      username: '',
      image: ''
    },
    store: {
      id: '',
      currentAuditStatus: ''
    },
    shoppingCarts: [],
    currentShoppingCart: null
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
